import { createRouter, createWebHistory } from 'vue-router'
import LoginView from "@/views/LoginView.vue";
import RegisterView from "@/views/RegisterView.vue";
import FunctionView from "@/views/FunctionView.vue";
import UpdateView from "@/views/UpdateView.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: LoginView,
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/register',
      name: 'register',
      component: RegisterView
    },
    {
      path: '/function',
      name: 'function',
      component: FunctionView
    },
    {
      path: '/update',
      name: 'update',
      component: UpdateView
    }
  ],
})

export default router
